import { createApp } from 'vue'
import App from './App.vue'
import './index.css'

// 全局指令这么写
let app = createApp(App)

app.directive("size-ob", {
    mounted(el, binding) {
        // 最外层的宽度
        let w = el.offsetWidth;
        let dom2 = el.querySelector(".content");
        // 内容的高度
        dom2 = el.querySelector(".content");
        let h = dom2.offsetHeight;
        binding.value({ w, h });
    }
})

app.mount('#app')

